package com.dji.common.contact;

/***
 * @author: xiaomage
 * Date : 2025/9/8
 * 人を信じよ、しかしその百倍も自らを信じよ
 *
 * Desc:  error  enum
 */
public enum CommonErrorEnum implements IErrorInfo {

    ILLEGAL_ARGUMENT(200001, "非法参数"),

    REDIS_DATA_NOT_FOUND(201404, "Redis数据不存在"),

    DEVICE_OFFLINE(212015, "设备离线"),

    GET_ORGANIZATION_FAILED(210230, "获取组织信息失败"),

    DEVICE_BINDING_FAILED(210231, "设备绑定失败"),

    NON_REPEATABLE_BINDING(210232, "设备已被其他组织绑定，无法重复绑定"),

    GET_DEVICE_BINDING_STATUS_FAILED(210233, "获取设备绑定状态失败"),

    SYSTEM_ERROR(600500, "系统错误"),

    SECRET_INVALID(600100, "密钥无效"),

    NO_TOKEN(600101, "令牌为空"),

    TOKEN_EXPIRED(600102, "令牌已过期"),

    TOKEN_INVALID(600103, "令牌无效"),

    SIGN_INVALID(600104, "签名无效");


    private String msg;

    private int code;

    CommonErrorEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public String getMessage() {
        return this.msg;
    }

    @Override
    public Integer getCode() {
        return this.code;
    }

}
